// 在项目中引入mongoose
const mongoose = require('mongoose')
// 创建schema对象
const advSchema = mongoose.Schema({
    advTitle: {
        type: String,
        require: true
    },
    advImg: {
        type: String,
        require: true
    },
    advCate: {
        type: String,
        require: true
    },
    advLink: {
        type: String,
        require: true
    },
    addAdvDate: {
        type: Date,
        default: Date.now()
    },
    updateAdvDate: {
        type: Date,
        default: Date.now()
    }
})

module.exports = advSchema